<template>
  <el-tag
    v-if="currentStatusKey"
    :type="EMatterTodoStatusType[currentStatusKey]"
  >
    {{ currentStatusKey }}
  </el-tag>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import {
  EMatterTodoStatus,
  EMatterTodoStatusType,
} from '@/components/statusShow/util'

/**
 * 事项待办理状态
 */
const { status } = defineProps<{
  status: number | undefined
}>()

const currentStatusKey = computed(() => {
  if (status !== 0 && !status) {
    return null
  }
  return EMatterTodoStatus[status] as keyof typeof EMatterTodoStatus
})
</script>

<style scoped lang="scss"></style>
